home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
tphide.zip
/
UNHIDE.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1993-01-04
|
809b
|
33 lines
program UnHideIt ;
{ Utility program to unhide files and directories;
by Mike Davenport, Neil Rubenking, and Andy Moore }
uses Dos ;
var
F : file ;
ATT : word ;
begin
if ParamCount = 0 then
begin
writeln('Enter the file/directory name to hide on the command line') ;
Halt(1) ;
end ;
Assign(F, ParamStr(1)) ;
GetFAttr(F,ATT) ;
ATT := ATT and $E5 ; { Mask off DIRECTORY, VOLUMEID, and HIDDEN bits }
SetFAttr(F,ATT) ;
case DosError of
0 : writeln(ParamStr(1), ' successfully unhidden') ;
1 : writeln('Invalid Function') ;
2 : writeln('File Not Found') ;
3 : writeln('Path Not Found or File Does Not Exist') ;
5 : writeln('Access Denied - Attribute Cannot Be Changed') ;
else
writeln('Unanticipated DOS Error = ',DosError) ;
end ;
end.